package demo;

import java.awt.Color;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JToolBar;

class ToolBarPanel extends JPanel {
	String[] data = { "Hello", "Java", "C/C++" };

	ToolBarPanel() {
		this.setBackground(Color.gray);
		JToolBar bar = new JToolBar();
		bar.add(new JComboBox(data));
		bar.add(new JButton("fff"));
		bar.add(new JButton("fff"));
		bar.add(new JButton("fff"));
		add(bar);
	}


}

public class MyFrame extends JFrame {
	MyFrame() {
		setTitle("Test");
		setSize(300, 200);

		ToolBarPanel panel = new ToolBarPanel();
		getContentPane().add(panel);
	}

	public static void main(String[] args) {
		MyFrame jellen = new MyFrame();
		jellen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jellen.setVisible(true);
	}
}
